package com.example.customsort.util;

public class List2Json {

    /*public String toJson(List<String> str)
    {
        StringBuilder json = new StringBuilder();

        if (str == null)
        {
            return "null";

        }

        json.append("[");
        foreach (var item in str)
        {
            json.Append("{\"Name\":\"");
            json.Append(item);
            json.Append("\"},");
        }

        return json.ToString().Substring(0, json.ToString().LastIndexOf(",")) + "]";
    }


    *//*得到并关联仓库(select标签)*//*

    public void ProcessRequest(HttpContext context)
    {

        SubinventoryDC subinventorydc = new SubinventoryDC();

        List<string> list = new List<string>();

        list = subinventorydc.getAllSubinventory();

        string json = toJson(list);

        context.Response.ContentType = "text/plain";

        context.Response.Write(json);
    }*/


}
